using Asp.Versioning;
using Asp.Versioning.OData;
using Microsoft.OData.ModelBuilder;
using OData.Shared.Models;

namespace OData.WebApi.Configuration;

public class ProductModelConfiguration : IModelConfiguration
{
	public void Apply(ODataModelBuilder builder, ApiVersion apiVersion, string? routePrefix)
	{
		var product = builder.EntitySet<Product>("Products").EntityType;
		product.HasKey(p => p.Id);
		//Todo: Add Function configuration and Action configuration
	}
}
